/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package robot;
import java.awt.AWTException;
import java.awt.Robot;
import java.awt.event.KeyEvent;
import java.io.*;
class NotepadClass {
    public static void main(String[] args) throws AWTException {
        Runtime rs = Runtime.getRuntime();
        try {
                rs.exec("notepad");
                
    }
    catch (IOException e) {
          System.out.println(e);
    }
    Robot robot = new Robot();
    robot.keyPress(KeyEvent.VK_C);
    robot.keyPress(KeyEvent.VK_I);
    robot.keyPress(KeyEvent.VK_A);
    robot.keyPress(KeyEvent.VK_O);
    robot.keyPress(KeyEvent.VK_SPACE);
    robot.keyPress(KeyEvent.VK_M);
    robot.keyPress(KeyEvent.VK_A);
    robot.keyPress(KeyEvent.VK_T);
    robot.keyPress(KeyEvent.VK_T);
    robot.keyPress(KeyEvent.VK_E);
    robot.keyPress(KeyEvent.VK_O);
    }
}

    
    
    
